﻿using RM.Weighing.Page;
using Sunny.UI;
using System;
using System.Windows.Forms;

namespace RM.Weighing
{
    public partial class UIMain : UIAsideMainFrame
    {
        public UIMain()
        {
            InitializeComponent();
            InitView();
        }

        private void InitView()
        {
            try
            {
                Aside.TabControl = MainTabControl;
                AddPage(new UIProduct(), 10001);
                Aside.CreateNode("产品设置", 10001);
                AddPage(new UIContent(), 10002);
                Aside.CreateNode("称重打印", 10002);
                AddPage(new UISettings(), 10003);
                Aside.CreateNode("系统设置", 10003);

                Aside.SelectFirst();
            }
            catch (Exception e)
            {

                Log.Error(e);
            }
        }

        private void UIMain_Selecting(object sender, TabControlCancelEventArgs e, UIPage page)
        {
            //Console.WriteLine(sender);
            //Console.WriteLine(e);
            //Console.WriteLine(page);
        }
    }
}
